<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="common/taglib.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>动态登录</title>
		<link rel="stylesheet" href="../style/css/base.css" />
		<link rel="stylesheet" href="../style/css/main.css" />
		<%@include file="common/common.jsp"%>
		<script src="../style/js/jquery.min.js"></script>
		<script src="../style/js/main.js"></script>
	</head>
	<body>
		<div>
			<div class="header">
				<div class="header_middle">
					<span class="logo fl"></span>
					<p class="fl f20 ml50 mt25 grey">欢迎登录</p>
				</div>
			</div>
			<div class="cont">
				<div class="payinfor tc">
					<div><img src="../style/img/img_login.png" alt="" class="left_pic fl"></div>
					<ul>
						<a href="#"><li id="tab_1" onClick="switchTab(1)"	>
							<img id="img_1" src="../style/img/radio_on.png"/>
							<font class="ml10 f16" id="font_1">普通登录</font>
						</li></a>
						<a href="#"><li id="tab_2" onClick="switchTab(2)" style="margin-left: 148px;">
							<img id="img_2" src="../style/img/radio.png"/>
							<font class="ml10 f16 grey" id="font_2">手机动态登录</font>
						</li></a>
					</ul>
					<div id="tab_con_1" style="">
						<p><input type="text" id="username" placeholder="用户名/手机号码" class="common_inp f16"></p>
						<p><input type="password" id="password" placeholder="密码" class="common_inp f16 mt20">
						</p>
						<a href="forget_psw.html"><p class="annotation annotation_ri grey">忘记密码？</p></a>
						<div class="fr" style="margin-right:70px;margin-top:-20px;">
							<a href="javascript:void(0)" onclick="NqLogin(this)" class="btn_sure block f16 mt30">登录</a>
							<a href="reg.do" class="block btn_sure f16 mt20">注册</a>
						</div>
					</div>
					<div id="tab_con_2" style="display:none;">
						<p><input type="tel" placeholder="请输入手机号码" class="common_inp f16"></p>
						<p><input type="text" placeholder="输入验证码" class="common_inp common_inp_add mt20 f16">
							<button class="btn_sec orange f16">获取手机验证码</button>
						</p>
						<a href="forget_psw.html"><p class="annotation annotation_ri mt10 grey">忘记密码？</p></a>
						<button class="btn_sure f16 mt50 cp">登录</button>
					</div>
				</div>
			</div>
			<div style="height: 126px;clear: both;"></div>
			<div id="footer_div"></div>
		</div>
	</body>
</html>
<SCRIPT>
	function NqLogin() {
		var username = $("#username").val();
		var password = $("#password").val();
		$.ajax({
			type:"post",
			url:basePath+"/logined.do",
			data:{username:username,password:password},
			success:function (data) {
				if(data=="success"){
					window.location.href = "/index.do"
				}else {
					alert("登录失败");
				}
			}
		});
	}
</SCRIPT>